﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ZwSoft.ZwCAD.EditorInput;
using ZwSoft.ZwCAD.Runtime;

[assembly: CommandClass(typeof(ToolBar.Cmd))] //启动时加载工具栏，注意typeof括号里的类库名
namespace ToolBar
{
    //没有修改，测试远程仓库
    public partial class Cmd
    {
        [CommandMethod("tst", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void tst()
        {
            MyMethod.Mymethod();

        }

        #region 对象对齐
        /// <summary>
        /// 水平左对齐
        /// </summary>
        [CommandMethod("ATL", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void AtlDemo() => MyMethod.EntityAlign(MyMethod.AlAndDis.AlignToLeft);
        /// <summary>
        /// 水平居中对齐
        /// </summary>
        [CommandMethod("ATC", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void AtcDemo() => MyMethod.EntityAlign(MyMethod.AlAndDis.AlignToCenter);
        /// <summary>
        /// 水平右对齐
        /// </summary>
        [CommandMethod("ATR", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void AtrDemo() => MyMethod.EntityAlign(MyMethod.AlAndDis.AlignToRight);
        /// <summary>
        /// 垂直顶对齐
        /// </summary>
        [CommandMethod("ATU", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void AtuDemo() => MyMethod.EntityAlign(MyMethod.AlAndDis.AlignToTop);
        /// <summary>
        /// 垂直居中对齐
        /// </summary>
        [CommandMethod("ATM", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void AtmDemo() => MyMethod.EntityAlign(MyMethod.AlAndDis.AlignToMiddle);
        /// <summary>
        /// 垂直底对齐
        /// </summary>
        [CommandMethod("ATB", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void AtblDemo() => MyMethod.EntityAlign(MyMethod.AlAndDis.AlignToBottom);
        #endregion
        #region 对象分布
        /// <summary>
        /// 水平左分布
        /// </summary>
        [CommandMethod("HDL", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void HdlDemo() => MyMethod.EntityDistribution(MyMethod.AlAndDis.HorizontalDistributionLeft);
        /// <summary>
        /// 水平居中分布
        /// </summary>
        [CommandMethod("HDC", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void HdcDemo() => MyMethod.EntityDistribution(MyMethod.AlAndDis.HorizontalDistributionCenter);
        /// <summary>
        /// 水平右分布
        /// </summary>
        [CommandMethod("HDR", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void HdrDemo() => MyMethod.EntityDistribution(MyMethod.AlAndDis.HorizontalDistributionRight);
        /// <summary>
        /// 垂直顶分布
        /// </summary>
        [CommandMethod("VDT", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void VdtDemo() => MyMethod.EntityDistribution(MyMethod.AlAndDis.VerticalDistributionTop);
        /// <summary>
        /// 垂直居中分布
        /// </summary>
        [CommandMethod("VDC", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void VdcDemo() => MyMethod.EntityDistribution(MyMethod.AlAndDis.VerticalDistributionCenter);
        /// <summary>
        /// 垂直底分布
        /// </summary>
        [CommandMethod("VDB", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void VdbDemo() => MyMethod.EntityDistribution(MyMethod.AlAndDis.VerticalDistributionBottom);
        /// <summary>
        /// 垂直分布间距
        /// </summary>
        [CommandMethod("VDS", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void VdsDemo() => MyMethod.EntityDistribution(MyMethod.AlAndDis.VerticalDistributionSpacing);
        /// <summary>
        ///水平分布间距
        /// </summary>
        [CommandMethod("HDS", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void HdsDemo() => MyMethod.EntityDistribution(MyMethod.AlAndDis.HorizontalDistributionSpacing);
        #endregion
        #region 文字内部(默认)对正
        /// <summary>
        /// 文字左上对正
        /// </summary>
        [CommandMethod("TALT", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TaltDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentLeftTop);
        /// <summary>
        /// 文字中上对正
        /// </summary>
        [CommandMethod("TACT", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TactsDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentCenterTop);
        /// <summary>
        /// 文字右上对正
        /// </summary>
        [CommandMethod("TART", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TartsDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentRightTop);
        /// <summary>
        /// 文字左中对正
        /// </summary>
        [CommandMethod("TALM", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TarlmDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentLeftMiddle);
        /// <summary>
        /// 文字正中对正
        /// </summary>
        [CommandMethod("TACM", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TacmDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentMiddle);
        /// <summary>
        /// 文字右中对正
        /// </summary>
        [CommandMethod("TARM", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TarmDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentRightMiddle);
        /// <summary>
        /// 文字左下对正
        /// </summary>
        [CommandMethod("TALB", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TalbsDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentLeftBottom);
        /// <summary>
        /// 文字中下对正
        /// </summary>
        [CommandMethod("TACB", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TacbsDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentCenterBottom);
        /// <summary>
        /// 文字右下对正
        /// </summary>
        [CommandMethod("TACR", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TacrsDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentRightBottom);
        #endregion
        #region 文字内部(原地)对正
        /// <summary>
        /// 文字左上对正
        /// </summary>
        [CommandMethod("TAFLT", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TafltDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentLeftTop, true);
        /// <summary>
        /// 文字中上对正
        /// </summary>
        [CommandMethod("TAFCT", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TafctsDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentCenterTop, true);
        /// <summary>
        /// 文字右上对正
        /// </summary>
        [CommandMethod("TAFRT", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TafrtsDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentRightTop, true);
        /// <summary>
        /// 文字左中对正
        /// </summary>
        [CommandMethod("TAFLM", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TafrlmDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentLeftMiddle, true);
        /// <summary>
        /// 文字正中对正
        /// </summary>
        [CommandMethod("TAFCM", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TafcmDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentMiddle, true);
        /// <summary>
        /// 文字右中对正
        /// </summary>
        [CommandMethod("TAFRM", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TafrmDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentRightMiddle, true);
        /// <summary>
        /// 文字左下对正
        /// </summary>
        [CommandMethod("TAFLB", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TaflbsDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentLeftBottom, true);
        /// <summary>
        /// 文字中下对正
        /// </summary>
        [CommandMethod("TAFCB", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TafcbsDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentCenterBottom, true);
        /// <summary>
        /// 文字右下对正
        /// </summary>
        [CommandMethod("TAFCR", CommandFlags.Session | CommandFlags.UsePickSet)]
        public static void TafcrsDemo() => MyMethod.TextAlignIn(MyMethod.TextAlIn.TextAlignmentRightBottom, true);
        #endregion
        //[CommandMethod("TtDemo", CommandFlags.Session)]
        //public static void TtDemo()
        //{
        //    MyMethod.Mymethod();
        //}
    }
}
